import styles from './EditList.module.scss'

type Props = {
  onClose: (value: string, prop: string) => void
  prop: string
  value: string
  onValueChange: (value: string, prop: string) => void
}

export const EditList = (props: Props) => {
  return (
    <div className={styles.root}>
      {/* <div className="list-item">男</div>
      <div className="list-item">女</div>
      <div className="list-item">取消</div> */}
      <div className="list-item" onClick={() => props.onValueChange('0', props.prop)}>
        {props.prop === 'gender' ? '男' : '拍照'}
      </div>
      <div className="list-item" onClick={() => props.onValueChange('1', props.prop)}>
        {props.prop === 'gender' ? '女' : '本地选择'}
      </div>
      <div className="list-item" onClick={() => props.onClose('cancel', props.prop)}>
        取消
      </div>
    </div>
  )
}
